﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;

namespace AtletIS.Shared.Helpers
{
    public static class ExceptionHelper
    {
        public static void ShowErrorInfo(Exception ex)
        { 
            string error = GetExceptionInfo(ex);
            MessageBox.Show(error, "Chyba v AtletIS", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        private static string GetExceptionInfo(Exception ex)
        {
            string result = "NASTALA CHYBA V APLIKÁCII."
                    + Environment.NewLine
                    + Environment.NewLine + "{0}";

            return string.Format(result, ex.ToString());
        }
    }
}
